package com.bungarus.model;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
 *
 * Created by tang on 2018/12/11.
 */
public class PagePayload<T extends PageItem> {
    /**
     * total count of items
     */
    @JsonProperty("total")
    private int totalCount;
    /**
     * current page number, starts with 0
     */
    @JsonProperty("offset")
    private int page;
    /**
     * item counts one page contains
     */
    @JsonProperty("size")
    private int size;
    /**
     * items one page contains
     */
    @JsonProperty("contents")
    private List<T> pageContents;

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public List<T> getPageContents() {
        return pageContents;
    }

    public void setPageContents(List<T> pageContents) {
        this.pageContents = pageContents;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }
}
